Skip to content

add: support for checking sign of integer datatype.#78

Merged
1uc merged 1 commit intomainfrom
1uc/get_sign
Aug 22, 2025
Merged

add: support for checking sign of integer datatype.#78
1uc merged 1 commit intomainfrom
1uc/get_sign

Conversation

@1uc
Copy link
Copy Markdown
Contributor

@1uc 1uc commented Aug 22, 2025

An integer HDF5 datatype (i.e. one that has class H5T_INTEGER) can be signed or unsigned. This commit adds a class IntegerType which supports the method isSigned.

Intended use:

auto dtype = /* obtain datatype */;
if(dtype.getClass() == DataTypeClass::Integer) {
  auto int_type = dtype.asIntegerType();
  if(int_type.isSigned()) {
    // ...
  }

An integer HDF5 datatype (i.e. one that has class `H5T_INTEGER`) can be
signed or unsigned. This commit adds a class `IntegerType` which
supports the method `isSigned`.

Intended use:

    auto dtype = /* obtain datatype */;
    if(dtype.getClass() == DataTypeClass::Integer) {
      auto int_type = dtype.asIntegerType();
      if(int_type.isSigned()) {
        // ...
      }
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 22, 2025

Codecov Report

❌ Patch coverage is 96.55172% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
include/highfive/bits/h5t_wrapper.hpp 80.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@1uc 1uc marked this pull request as ready for review August 22, 2025 11:10
@1uc 1uc merged commit 5b05204 into main Aug 22, 2025
34 checks passed
@1uc 1uc deleted the 1uc/get_sign branch August 22, 2025 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants